<div class="formulario">
    <div class="form-titulo">
        <!--h2>Cliente: <strong><!--%= @cliente.NombreORazon %></strong></h2-->
        <h2>RT'<strong>s</strong></h2>

        <div class="form-buttons">
            <a class="button-adicional" id="dropdownMenu2" data-toggle="dropdown" rel="tooltip" data-placement="top" data-original-title="Mas Acciones">
                <i class="fa fa-cog"></i>
            </a>
            <a class="button-adicional" href="#" data-toggle="collapse" data-target="#form-data" rel="tooltip" data-placement="top" data-original-title="Colapsar">
                <i class="fa fa-chevron-down"></i>
            </a>
            <a class="button-adicional" href="#" rel="tooltip" data-placement="top" data-original-title="Ayuda">
                <i class="fa fa-question-circle"></i>
            </a>

            <%= link_to receiving_tickets_path, class: "btn btn-primary btn-xs" do %>
                <i class="fa fa-arrow-left"></i> Regresar
            <% end %>
        </div>
    </div>

    <div class="in form-body wizard" id="form-data">
        <div class="row">
            <div class="col-sm-12">
                <div class="form-group">
                    <div id="rootwizard">
                        <div class="navbar">
                            <div class="navbar-inner">
                                <div class="container">
                                    <ul>
                                        <li><a href="#tab1" data-toggle="tab"><span class="wizard-number">1</span> Ordenes</a></li>
                                        <li><a href="#tab2" data-toggle="tab"><span class="wizard-number">2</span> Generales</a></li>
                                        <li><a href="#tab3" data-toggle="tab" id="tab-proveedor"><span class="wizard-number">3</span> Proveedor</a></li>
                                        <li><a href="#tab4" data-toggle="tab"><span class="wizard-number">4</span> Transportista</a></li>
                                        <li><a href="#tab5" data-toggle="tab"><span class="wizard-number">5</span> Mercancía</a></li>
                                        <li><a href="#tab6" data-toggle="tab"><span class="wizard-number">6</span> Reexpedición</a></li>
                                        <li><a href="#tab7" data-toggle="tab" id="confirmar"><span class="wizard-number">7</span> Confirmar</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>

                        <%= form_for(@receiving_ticket) do |f| %>
                            <% if @receiving_ticket.errors.any? %>
                                <div id="error_explanation">
                                    <h2><%= pluralize(@receiving_ticket.errors.count, "error") %> prohibited this receiving_ticket from being saved:</h2>

                                    <ul>
                                        <% @receiving_ticket.errors.full_messages.each do |msg| %>
                                            <li><%= msg %></li>
                                        <% end %>
                                    </ul>
                                </div>
                            <% end %>

                            <%= f.hidden_field :IdCliente, :value=> @cliente.id %>

                            <div class="tab-content">
                                 <div class="tab-pane" id="tab1">
                                    <p>
                                        
                                            <%= render 'seleccionar_ordenes', :f => f %>
                                        
                                    </p>
                                </div>
                                <div class="tab-pane" id="tab2">
                                    <div class="row">
                                        <div class="col-sm-6">
                                            <div class="form-group campo-data">
                                                <label>Tipo de Entrada</label>
                                                <%= f.collection_select :IdTipoEntrada, @tipos_entrada , :id , :Nombre, {:prompt => '-- Seleccione un tipo entrada --'}, {:class => "fform-control input-sm select selectpicker show-tick"} %>
                                            </div>

                                            <div class="form-group campo-data">
                                                <label>Destino</label>
                                                <%= f.collection_select :IdDestino, @destinos , :id, :Nombre, {:prompt => '-- Seleccione un destino --'}, {:class => "form-control input-sm select selectpicker show-tick"} %>
                                            </div>

                                            <div class="form-group campo-data">
                                                <label>Hora</label>
                                                <%= f.text_field :Hora, :value =>DateTime.now.strftime("%H:%M:%S"), :class => "form-control input-sm" %>
                                            </div>
                                        </div>

                                        <div class="col-sm-6">
                                            <div class="form-group campo-data">
                                                <label>Consecutivo Cliente</label>
                                                <%= f.text_field :ConsecCliente, :class => "form-control input-sm" %>
                                            </div>

                                            <div class="form-group campo-data">
                                                <label>Fecha Recepción</label>
                                                <%= f.text_field :FechaRecepcion, :value => DateTime.now.strftime("%d/%m/%Y"), :class => "form-control input-sm" %>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="tab-pane" id="tab3">
                                    <legend>Datos del <strong>Proveedor</strong></legend>
                                    <p>
                                        <%= f.fields_for :rt_proveedor do |builder| %>
                                            <% render "datos_proveedor" , :f => builder %>
                                        <% end %>
                                    </p>
                                </div>

                                <div class="tab-pane" id="tab4">
                                    <legend>Datos del <strong>Transportista</strong></legend>
                                    <p>
                                        <%= f.fields_for :rt_transportista do |builder| %>
                                            <% render "datos_transportista", :f => builder %>
                                        <% end %>
                                    </p>
                                </div>

                                <div class="tab-pane" id="tab5">
                                    <legend>Datos de la <strong>Mercancía</strong></legend>
                                    <p>
                                        <%= f.fields_for :rt_mercancia do |builder| %>
                                            <% render "datos_mercancia", :f => builder %>
                                        <% end %>
                                    </p>
                                </div>

                                <div class="tab-pane" id="tab6">
                                    <legend>Datos de <strong>Reexpedición</strong></legend>
                                    <p>
                                        <%= f.fields_for :reexpedicion do |builder| %>
                                            <% render "datos_reexpedicion", :f => builder %>
                                        <% end %>
                                    </p>
                                </div>

                                <div class="tab-pane" id="tab7">
                                    <legend><strong>Confirmar</strong></legend>
                                    <%= render "confirmacion", :f => f %>
                                    <%= f.submit "Guardar", :class => "btn btn-success"%>
                                </div>

                                <ul class="pager wizard">
                                    <li class="previous first" style="display:none;"><a href="#">Primero</a></li>
                                    <li class="previous"><a href="#"><i class="fa fa-chevron-left"></i> Anterior</a></li>
                                    <li class="next last" style="display:none;"><a href="#">Ultimo</a></li>
                                    <li class="next"><a href="#"><i class="fa fa-chevron-right"></i> Siguiente</a></li>
                                </ul>
                            </div>
                        <% end %>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="formulario-footer" id="footer">
    <div class="progress progress-striped active">
        <div class="progress-bar bar"  role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
            <span class="sr-only">45% Complete</span>
        </div>
    </div>
</div>






 


 

